<include file="Public/header" />
<title>管理员列表</title>
<style>
	.red td,.red td a{
		color:red;
	}
	.yellow td,.yellow td a{
		color:yellow;
	}
	.blue td,.yellow td a{
		color:blue;
	}
</style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 统计视图 <span class="c-gray en">&gt;</span> 余额统计 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">

	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<form class="formleft" name="" id="" action="__URL__/fee/" method="get">
			日期范围：
			<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'logmax\')||\'%y-%M-%d\'}'})" id="logmin" name="start_time" value="<{$Think.get.start_time}>" class="input-text Wdate" style="width:120px;">
			-
			<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'logmin\')}',maxDate:'%y-%M-%d'})" id="logmax" name="end_time" value="<{$Think.get.end_time}>" class="input-text Wdate" style="width:120px;">
			充值
			<input type="radio" name="operate_type" <if condition="I('operate_type') eq '+' ">checked</if> value="+">
			扣费
			<input type="radio" name="operate_type" <if condition="I('operate_type') eq '-' ">checked</if> value="-">
			
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>
			<a href="javascript:;" onclick="payfee()" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 充值</a>
			<span style="font-size:20px;color:red;font-weight:bold;vertical-align:middle;">余额：<{:sprintf("%.2f",$usable_money)}>&nbsp;&nbsp;&nbsp;&nbsp;统计：<{:sprintf("%.2f",$count_money)}></span>
			<!-- 已充值：<{$count_data_add}> 已使用：<{$count_data_reduce}> -->
			
		</form>
		<span class="r">共有数据：<strong><{$count}></strong> 条</span> 
    </div>
	
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="15">对账单列表</th>
			</tr>
			<tr class="text-c">
				<th width="25" class="sorting_disabled" rowspan="1" colspan="1" aria-label="" style="width: 25px;"><input type="checkbox" name="" value=""></th>
				<th width="25">序号</th>
				<th width="">日期时间</th>
				<th width="">金额</th>
				<th width="">运单号</th>
				<th width="">备注</th>
				<th width="">类型</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c <if condition="$vo.operate_type eq '+' ">red</if>">
				<td><input type="checkbox" value="<{$vo.id}>" name="" class="ids"></td>
				<td><{$i}></td>
				<td><{$vo.add_time}></td>
				<td>
					<{$vo.money}>
				</td>
				<td><{$vo.logistics_no}></td>
				<td><{$vo.remark}></td>
				<td>
				<if condition="$vo.operate_type eq '+' ">
					充值
				</if>
				<if condition="$vo.operate_type eq '-' ">
					扣费
				</if>
				</td>
			</tr>
			</volist>
		</tbody>
	</table>
	<div class="page mt" style="text-align:right"><{$page}></div>
</div>
<script>
	//充值
	function payfee(){
		total_fee_url="http://www.t-cang.com/oms/index.php/Api/ErpApi/tz_toPay";
		layer.prompt({title:'充值',formType:0},function(text,index){
			user_code="<{$Think.session.company.user_code}>";
			total_fee=text;
			total_fee_url=total_fee_url+"/user_code/"+user_code+"/total_fee/"+total_fee;
			console.log(total_fee_url);
			window.open(total_fee_url);
			layer.close(index);
		});
	}
</script>
 <include file="Public/footer" />
<include file="Public/footer_js" />
</body>
</html>